package com.jrx.anytxn.param.config;

public class DefaultConfig {
    /**
     * 提交数量
     */
    private Integer chunkLimit = 100;

    /**
     * 异常跳过数量
     */
    private Integer skipLimit = 0;

    /**
     * 线程数
     */
    private Integer throttleLimit = 1;

    /**
     * PagingItemReader一次查询数量
     */
    private Integer pageSize = 10000;

    public DefaultConfig() {
    }

    public DefaultConfig(Integer chunkLimit, Integer skipLimit, Integer throttleLimit, Integer pageSize) {
        this.chunkLimit = chunkLimit;
        this.skipLimit = skipLimit;
        this.throttleLimit = throttleLimit;
        this.pageSize = pageSize;
    }

    public Integer getChunkLimit() {
        return chunkLimit;
    }

    public void setChunkLimit(Integer chunkLimit) {
        this.chunkLimit = chunkLimit;
    }

    public Integer getSkipLimit() {
        return skipLimit;
    }

    public void setSkipLimit(Integer skipLimit) {
        this.skipLimit = skipLimit;
    }

    public Integer getThrottleLimit() {
        return throttleLimit;
    }

    public void setThrottleLimit(Integer throttleLimit) {
        this.throttleLimit = throttleLimit;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }


    @Override
    public String toString() {
        String sb = "DefaultConfig{" + "chunkLimit=" + chunkLimit +
                ", skipLimit=" + skipLimit +
                ", throttleLimit=" + throttleLimit +
                ", pageSize=" + pageSize +
                '}';
        return sb;
    }
}
